package com.seecen.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Objects;

/**
 * 地址表
 * @TableName t_address
 */
@TableName(value ="t_address")
@Data
public class Address {
    /**
     * 自增主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    private Long uid;

    /**
     * 用户名
     */
    private String username;

    /**
     * 地址
     */
    private String address;
    private String mobile;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Address address1 = (Address) o;
        return Objects.equals(id, address1.id) && Objects.equals(uid, address1.uid) && Objects.equals(username, address1.username) && Objects.equals(address, address1.address) && Objects.equals(mobile, address1.mobile);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, uid, username, address, mobile);
    }
}